/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 *
 * ***************************************************************************/

using System.CodeDom.Compiler;

namespace Microsoft.Scripting.Actions {
    public static class CallSiteFactory {

        #region Generated Dynamic Sites Construction Helpers

        // *** BEGIN GENERATED CODE ***
        // generated by function: gen_construction_helpers from: generate_dynsites.py

        [GeneratedCode("DLR", "2.0")]
        public static DynamicSite<T0, TRet> CreateSimpleCallSite<T0, TRet>(ActionBinder binder) {
            return DynamicSite<T0, TRet>.Create(CallAction.Make(binder, 0));
        }

        [GeneratedCode("DLR", "2.0")]
        public static DynamicSite<T0, T1, TRet> CreateSimpleCallSite<T0, T1, TRet>(ActionBinder binder) {
            return DynamicSite<T0, T1, TRet>.Create(CallAction.Make(binder, 1));
        }

        [GeneratedCode("DLR", "2.0")]
        public static DynamicSite<T0, T1, T2, TRet> CreateSimpleCallSite<T0, T1, T2, TRet>(ActionBinder binder) {
            return DynamicSite<T0, T1, T2, TRet>.Create(CallAction.Make(binder, 2));
        }

        [GeneratedCode("DLR", "2.0")]
        public static DynamicSite<T0, T1, T2, T3, TRet> CreateSimpleCallSite<T0, T1, T2, T3, TRet>(ActionBinder binder) {
            return DynamicSite<T0, T1, T2, T3, TRet>.Create(CallAction.Make(binder, 3));
        }

        [GeneratedCode("DLR", "2.0")]
        public static DynamicSite<T0, T1, T2, T3, T4, TRet> CreateSimpleCallSite<T0, T1, T2, T3, T4, TRet>(ActionBinder binder) {
            return DynamicSite<T0, T1, T2, T3, T4, TRet>.Create(CallAction.Make(binder, 4));
        }

        [GeneratedCode("DLR", "2.0")]
        public static DynamicSite<T0, T1, T2, T3, T4, T5, TRet> CreateSimpleCallSite<T0, T1, T2, T3, T4, T5, TRet>(ActionBinder binder) {
            return DynamicSite<T0, T1, T2, T3, T4, T5, TRet>.Create(CallAction.Make(binder, 5));
        }

        [GeneratedCode("DLR", "2.0")]
        public static DynamicSite<T0, T1, T2, T3, T4, T5, T6, TRet> CreateSimpleCallSite<T0, T1, T2, T3, T4, T5, T6, TRet>(ActionBinder binder) {
            return DynamicSite<T0, T1, T2, T3, T4, T5, T6, TRet>.Create(CallAction.Make(binder, 6));
        }

        [GeneratedCode("DLR", "2.0")]
        public static DynamicSite<T0, T1, T2, T3, T4, T5, T6, T7, TRet> CreateSimpleCallSite<T0, T1, T2, T3, T4, T5, T6, T7, TRet>(ActionBinder binder) {
            return DynamicSite<T0, T1, T2, T3, T4, T5, T6, T7, TRet>.Create(CallAction.Make(binder, 7));
        }

        [GeneratedCode("DLR", "2.0")]
        public static void CreateSimpleCallSite<T0, TRet>(ActionBinder binder, ref DynamicSite<T0, TRet> site) {
            if (!site.IsInitialized) {
                site.EnsureInitialized(CallAction.Make(binder, 0));
            }
        }

        [GeneratedCode("DLR", "2.0")]
        public static void CreateSimpleCallSite<T0, T1, TRet>(ActionBinder binder, ref DynamicSite<T0, T1, TRet> site) {
            if (!site.IsInitialized) {
                site.EnsureInitialized(CallAction.Make(binder, 1));
            }
        }

        [GeneratedCode("DLR", "2.0")]
        public static void CreateSimpleCallSite<T0, T1, T2, TRet>(ActionBinder binder, ref DynamicSite<T0, T1, T2, TRet> site) {
            if (!site.IsInitialized) {
                site.EnsureInitialized(CallAction.Make(binder, 2));
            }
        }

        [GeneratedCode("DLR", "2.0")]
        public static void CreateSimpleCallSite<T0, T1, T2, T3, TRet>(ActionBinder binder, ref DynamicSite<T0, T1, T2, T3, TRet> site) {
            if (!site.IsInitialized) {
                site.EnsureInitialized(CallAction.Make(binder, 3));
            }
        }

        [GeneratedCode("DLR", "2.0")]
        public static void CreateSimpleCallSite<T0, T1, T2, T3, T4, TRet>(ActionBinder binder, ref DynamicSite<T0, T1, T2, T3, T4, TRet> site) {
            if (!site.IsInitialized) {
                site.EnsureInitialized(CallAction.Make(binder, 4));
            }
        }

        [GeneratedCode("DLR", "2.0")]
        public static void CreateSimpleCallSite<T0, T1, T2, T3, T4, T5, TRet>(ActionBinder binder, ref DynamicSite<T0, T1, T2, T3, T4, T5, TRet> site) {
            if (!site.IsInitialized) {
                site.EnsureInitialized(CallAction.Make(binder, 5));
            }
        }

        [GeneratedCode("DLR", "2.0")]
        public static void CreateSimpleCallSite<T0, T1, T2, T3, T4, T5, T6, TRet>(ActionBinder binder, ref DynamicSite<T0, T1, T2, T3, T4, T5, T6, TRet> site) {
            if (!site.IsInitialized) {
                site.EnsureInitialized(CallAction.Make(binder, 6));
            }
        }

        [GeneratedCode("DLR", "2.0")]
        public static void CreateSimpleCallSite<T0, T1, T2, T3, T4, T5, T6, T7, TRet>(ActionBinder binder, ref DynamicSite<T0, T1, T2, T3, T4, T5, T6, T7, TRet> site) {
            if (!site.IsInitialized) {
                site.EnsureInitialized(CallAction.Make(binder, 7));
            }
        }


        // *** END GENERATED CODE ***

        #endregion
    }
}